package com.avicit.zipkinkafkaesserver.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import org.springframework.data.elasticsearch.annotations.Document;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 记录定时获取es 数据情况
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "ZIPKIN_UPDATE_MSG")
public class ZipkinUpdateMsg implements Serializable {

  @Id
  private String id;
  private String esIndex;
  private String esType;
  private String jobType;//区分job 的类型
  private boolean updateStatus;
  private Integer errorCount;

  private String queryDate;

  @Temporal(TemporalType.TIMESTAMP)
  @CreationTimestamp
  private Date createTime;
  @Temporal(TemporalType.TIMESTAMP)
  @UpdateTimestamp
  private Date updateTime;



}
